def select_sort(data_list):
    """选择排序"""
    n = len(data_list)
    for j in range(n-1):
        min_index = j
        for i in range(j+1, n):
            if data_list[i] < data_list[min_index]:
                min_index = i
        if j != min_index:
            data_list[j], data_list[min_index] = data_list[min_index], data_list[j]


if __name__ == '__main__':
    li = [54, 26, 93, 17, 77, 31, 44, 55, 20, 13]
    print(li)
    select_sort(li)
    print(li)


